//*************************************************************************************************
//************************ (C) 2001 - 2006, Eleven Engineering Incorporated ***********************
//*************************************************************************************************
//**
//**		Tabs:	This file looks best with tab stops set every 6 spaces.
//**
//*************************************************************************************************
//*************************************************************************************************
//**
//**          File:  XPD Serial.h
//**       Project:  XInc2 Library
//**       Created:  04 Jan 2003 by Ryan Northcott
//**       Revised:  08 Sep 2006 by Dan Beutel
//**
//**   Description:  Constants used by the routines in "XPD Serial.asm".
//**
//** Compatibility:  Requires XInA v4.4 or higher.
//**
//**    Disclaimer:  You may incorporate this sample source code into your program(s) without
//**                 restriction.  This sample source code has been provided "AS IS" and the
//**                 responsibility for its operation is yours.  You are not permitted to
//**                 redistribute this sample source code as "Eleven sample source code" after
//**                 having made changes.  If you are going to re-distribute the source, we require
//**                 that you make it clear in the source that the code was descended from Eleven
//**                 sample source code, but that you have made changes.
//**
//*************************************************************************************************
//*************************************************************************************************


#ifndef	__LIB_XPD_SERIAL_H__
#define	__LIB_XPD_SERIAL_H__

//-------------------------------------------------------------
// XPD Port Configuration Constants
//-------------------------------------------------------------

	// Baud Rate Constants
		#define	kXPD_BaudRate_230400		0x0
		#define	kXPD_BaudRate_115200		0x1
		#define	kXPD_BaudRate_76800		0x8
		#define	kXPD_BaudRate_57600		0x2
		#define	kXPD_BaudRate_38400		0x9
		#define	kXPD_BaudRate_28800		0x3
		#define	kXPD_BaudRate_19200		0xA
		#define	kXPD_BaudRate_14400		0x4
		#define	kXPD_BaudRate_9600		0xB
		#define	kXPD_BaudRate_7200		0x5
		#define	kXPD_BaudRate_4800		0xC
		#define	kXPD_BaudRate_3600		0x6
		#define	kXPD_BaudRate_2400		0xD
		#define	kXPD_BaudRate_1800		0x7
		#define	kXPD_BaudRate_1200		0xE
		#define	kXPD_BaudRate_600			0xF

	// Protocol Constants
		#define	kXPD_Use7DataBits			1 << 4
		#define	kXPD_EnableParityBits		1 << 5
		#define	kXPD_Use2StopBits			1 << 6
		#define	kXPD_Enable_IrDA_Timing		1 << 7
		#define	kXPD_Shutdown			1 << 12
		#define	kXPD_DisableFIFO			1 << 13

	// XInc2 Clock Speed Constants
		#define	kXPD_ClockLE_3MHz			0 << 8
		#define	kXPD_ClockLE_6MHz			1 << 8
		#define	kXPD_ClockLE_12MHz		2 << 8
		#define	kXPD_ClockLE_24MHz		3 << 8
		#define	kXPD_ClockLE_48MHz		4 << 8
		#define	kXPD_ClockLE_96MHz		5 << 8
		#define	kXPD_ClockLE_192MHz		6 << 8
		#define	kXPD_ClockLE_384MHz		7 << 8

//-------------------------------------------------------------
// XPD Port Control Constants
//-------------------------------------------------------------
		#define	kXPD_ParityBit			8
		#define	kXPD_CTS_RTS_Bit			9
		#define	kXPD_ErrorBit			10
		#define	kXPD_TransmitDoneBit		14
		#define	kXPD_DataReceivedBit		15

//-------------------------------------------------------------
// ASCII Constants
//-------------------------------------------------------------
		#define	EOS			0	// End Of String
		#define	BS			8	// Back Space
		#define	CR			13	// Carriage Return
		#define	LF			10	// Line Feed

#endif